package jsu.weizixuan.likesystem.util;


import jsu.weizixuan.likesystem.constant.ThumbConstant;

/**
 * @author pine
 */
public class RedisKeyUtil {

    /**
     * 获取 用户点赞记录 key
     */
    public static String getUserThumbKey(Long userId) {
        return ThumbConstant.USER_THUMB_KEY_PREFIX + userId;
    }

    /**
     * 获取 临时点赞记录 key
     */
    public static String getTempThumbKey(String time) {
        return ThumbConstant.TEMP_THUMB_KEY_PREFIX.formatted(time);
    }

    /**
     * 获取 点赞数 key
     */
    public static String getThumbCountKey(Long blogId) {
        return ThumbConstant.THUMB_COUNT_KEY_PREFIX + blogId;
    }

}
